list_a = [1, 2, 3]
list_b = [4, 5, 6]

a_plus_b = [a + b for a in list_a for b in list_b]
a_multi_b = [a * b for a in list_a for b in list_b]

print(a_plus_b)
print(a_multi_b)


from dataclasses import dataclass

@dataclass()
class Person:
    name: str
    age: str
    sex: str
    height: int

    def __iter__(self):
        for name, value in vars(self).items():
            yield name, value


zhang = Person('张三', '21', '女', 166)
print(zhang)

list_zhang = [name + "=" + str(value) for name, value in zhang]
print(list_zhang)